package com.skyvin.nreceipts.common.document;

import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.DBRef;
import org.springframework.data.mongodb.core.mapping.Document;

@Document
public class ReceiptItem {
	
	@Id
	private String id;
	private String itemId; 

	private String name; 
	private double price; 
	 
	private String userPID; 
	
	@DBRef 
	private ReceiptItemCategory receiptItemCategory;
	
	private transient Receipt receipt;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public double getPrice() {
		return price;
	}

	public void setPrice(double price) {
		this.price = price;
	}

	

	public String getUserPID() {
		return userPID;
	}

	public void setUserPID(String userPID) {
		this.userPID = userPID;
	}

	public ReceiptItemCategory getReceiptItemCategory() {
		return receiptItemCategory;
	}

	public void setReceiptItemCategory(ReceiptItemCategory receiptItemCategory) {
		this.receiptItemCategory = receiptItemCategory;
	}

	public Receipt getReceipt() {
		return receipt;
	}

	public void setReceipt(Receipt receipt) {
		this.receipt = receipt;
	}

	public String getItemId() {
		return itemId;
	}

	public void setItemId(String itemId) {
		this.itemId = itemId;
	}

	@Override
	public String toString() {
		return "ReceiptItem [id=" + id + ", itemId=" + itemId + ", name="
				+ name + ", price=" + price + ", userPID=" + userPID + "]";
	}
	
	

}
